package com.mindata.blockchain.socket.distruptor.base;

import java.io.Serializable;

import org.tio.core.ChannelContext;

import com.mindata.blockchain.socket.packet.BlockPacket;

/**
 * 生产、消费者之间传递消息用的event
 *
 * @author wuweifeng wrote on 2018/4/20.
 */
public class BaseEvent implements Serializable {
	/**
	 *
	 */
	private static final long serialVersionUID = 7359259804938381227L;
	private BlockPacket blockPacket;
	private ChannelContext channelContext;

	public BaseEvent(final BlockPacket blockPacket, final ChannelContext channelContext) {
		this.blockPacket = blockPacket;
		this.channelContext = channelContext;
	}

	public BaseEvent(final BlockPacket blockPacket) {
		this.blockPacket = blockPacket;
	}

	public BaseEvent() {
	}

	public ChannelContext getChannelContext() {
		return channelContext;
	}

	public void setChannelContext(final ChannelContext channelContext) {
		this.channelContext = channelContext;
	}

	public BlockPacket getBlockPacket() {
		return blockPacket;
	}

	public void setBlockPacket(final BlockPacket blockPacket) {
		this.blockPacket = blockPacket;
	}
}
